package com.cloud.mkz.common.api.feign;

import com.cloud.mkz.common.api.feign.factory.ProducerServiceFallbackFactory;
import com.cloud.mkz.core.common.constant.ServiceNameConstants;
import com.cloud.mkz.core.common.util.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Kafka消息发送
 *
 * @author: KuangJianyu
 * @date: 2021年3月3日
 */
@FeignClient(contextId = "producerClient", value = ServiceNameConstants.API_SERVICE, fallbackFactory = ProducerServiceFallbackFactory.class)
public interface ProducerClient {
	/**
	 * 普通消息发送
	 *
	 * @param topic 主题
	 * @param content 消息内容
	 * @param bustype 业务类别
	 * @return ResponseResult
	 */
	@PostMapping("/basicSend")
	public ResponseResult<Boolean> basicSend(@RequestParam("topic") String topic,
											 @RequestParam("content") String content,
											 @RequestParam("bustype") String bustype);
}
